package odgs;

public class GridNode
{
	private String id;
	private long allowedSize;
	private long usedSize;
	private long reservedSize;

	public GridNode(String id, long allowedSize, long usedSize, long reservedSize) {
		this.id = id;
		this.allowedSize = allowedSize;
		this.usedSize = usedSize;
		this.reservedSize = reservedSize;
	}

	public long getReservedStorageSize() 
	{
		return reservedSize;
	}
	
	public void setReservedSize(long reservedSize) 
	{
		this.reservedSize = reservedSize;
	}
	
	public long getAllowedSize()
	{
		return allowedSize;
	}

	public void setAllowedSize(long allowedSize)
	{
		this.allowedSize = allowedSize;
	}

	public String getId()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public long getUsedSize()
	{
		return usedSize;
	}

	public void setUsedSize(long usedSize)
	{
		this.usedSize = usedSize;
	}
	
	public long getFreeSize()
	{
		return allowedSize - (usedSize + reservedSize);
	}
}